import request from '@/utils/request'
//显示学生列表
export function getStudent() {
    return request({
        url: '/Student/getStudent',  //后端接口，显示学生列表
        method: 'get'
    })
};

//删除单个学生数据
export function deleteStudent(studentId) {
    return request({
        method: 'post',
        maxBodyLength: Infinity,
        url: '/Student/deleteStudent?studentid=' + studentId,
        headers: {
            'Content-Type': 'application/json'
        },
        data: studentId
    })

}

//更改学生信息
export function updateStudent(obj) {
    return request({
        method: 'post',
        maxBodyLength: Infinity,
        url: 'Student/updateStudent',
        headers: {
            'Content-Type': 'application/json'
        },
        data: obj
    })
}

//通过studentid查询学生信息
export function findStudentById(studentId) {
    return request({
        method: 'get',
        maxBodyLength: Infinity,
        url: '/Student/findStudentById?studentId=' + studentId,
        headers: {
            'Content-Type': 'application/json'
        },
        data: studentId
    })
}

//添加学生
export function insertStudent(obj) {
    return request({
        method: 'post',
        maxBodyLength: Infinity,
        url: '/Student/insertStudent',
        headers: {
            'Content-Type': 'application/json'
        },
        data: obj
    })
}
//批量删除
export function deleteBatchStudent(ids) {
    return request({
        method: 'post',
        maxBodyLength: Infinity,
        url: '/Student/deleteBatchStudent',
        headers: {
            'Content-Type': 'application/json'
        },
        data: ids
    })
}
//模糊查询
export function findStudentmany(data) {
    return request({
        method: 'post',
        maxBodyLength: Infinity,
        url: '/Student/findStudentmany',
        headers: {
            'Content-Type': 'application/json'
        },
        data: data
    })
}